package com.woniuxy.third.controller;

import com.woniuxy.third.entity.School;
import com.woniuxy.third.entity.subject.FirstSubject;
import com.woniuxy.third.result.ResponseResult;
import com.woniuxy.third.service.EduSubjectService;
import com.woniuxy.third.service.SchoolService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/school")
public class SchoolController {
    @Resource
    private SchoolService schoolService;
    @RequestMapping("/all")
    public ResponseResult<List<School>> getAllSchool(){
        //List返回一级学科
        List<School> list=schoolService.findAllSchool();
        ResponseResult<List<School>> result = new ResponseResult<List<School>>();
        result.setData(list);
        return result;
    }
}
